package com.zyf.chapter02.behavior.observer.eventbus.p2p;

import com.zyf.chapter02.behavior.observer.eventbus.Subscribe;
import com.zyf.chapter02.behavior.observer.p2p.PromotionService;

/**
 * 用户相关监听类
 * @author yifeng
 */
public class UserListener {
    PromotionService promotionService = new PromotionService();

    @Subscribe
    public void listener(Long userId) {
        promotionService.issueNewUserExperienceCash(userId);
        System.out.println("注册成功，已为您发放体验金~");
    }
}
